ci: add formatting and Helm lint checks#384
Conversation
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR expands the existing lint workflow by adding separate jobs for Go formatting checks and Helm chart linting/rendering.
Changes:
- Added a
gofmtjob that runsmake fmt-checkwhen Go-related files change. - Added a
helmjob that runsmake helm-lintand renders templates when chart-related files change.
| gofmt: | ||
| name: gofmt | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Filter paths | ||
| id: changes | ||
| uses: dorny/paths-filter@v3 |
| - name: Check Go formatting | ||
| if: steps.changes.outputs.gofmt == 'true' | ||
| run: make fmt-check | ||
|
|
||
| helm: | ||
| name: helm-lint | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Filter paths | ||
| id: changes | ||
| uses: dorny/paths-filter@v3 |
| - name: Lint Helm chart | ||
| if: steps.changes.outputs.helm == 'true' | ||
| run: make helm-lint |
| - name: Set up Helm | ||
| if: steps.changes.outputs.helm == 'true' | ||
| uses: azure/setup-helm@v4 |
| - name: Render Helm chart | ||
| if: steps.changes.outputs.helm == 'true' | ||
| run: make helm-template > /tmp/agentcube-rendered.yaml |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #384 +/- ##
==========================================
+ Coverage 58.41% 58.47% +0.05%
==========================================
Files 36 36
Lines 3463 3463
==========================================
+ Hits 2023 2025 +2
+ Misses 1231 1230 -1
+ Partials 209 208 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
LiZhenCheng9527
left a comment
There was a problem hiding this comment.
Can it be written into the Makefile?
|
|
||
| gofmt: | ||
| name: gofmt | ||
| runs-on: ubuntu-24.04 |
There was a problem hiding this comment.
suggest ubuntu-latest
bc3141e to
8df7924
Compare
Signed-off-by: CYJiang <86391540+googs1025@users.noreply.github.com>
Signed-off-by: CYJiang <86391540+googs1025@users.noreply.github.com>
8df7924 to
61a35f2
Compare
yes, already add in #383 |
Signed-off-by: CYJiang <googs1025@gmail.com> # Conflicts: # .github/workflows/lint.yml
|
Adding label DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@hzxuzhonghu /PTAL |
| golangci: | ||
| name: golangci-lint | ||
| needs: changes | ||
| if: needs.changes.outputs.lint == 'true' | ||
| runs-on: ubuntu-24.04 |
| gofmt: | ||
| name: gofmt | ||
| needs: changes | ||
| if: needs.changes.outputs.gofmt == 'true' | ||
| runs-on: ubuntu-24.04 |
| helm: | ||
| name: helm-lint | ||
| needs: changes | ||
| if: needs.changes.outputs.helm == 'true' | ||
| runs-on: ubuntu-24.04 |
What this PR does
gofmtjob to the existing lint workflow, runningmake fmt-checkfor Go formatting verification.helm-lintjob to validate the base Helm chart withmake helm-lint.make helm-templateto catch template errors without flooding CI logs.This follows up on review feedback from #383: some developer lint commands should also run in CI.
Verification
make fmt-checkmake helm-lintmake helm-template >/tmp/agentcube-rendered.yamlruby -e 'require "yaml"; YAML.load_file(".github/workflows/lint.yml")'git diff --check